<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <base data-ice="baseUrl" href="../../../../">
  <title data-ice="title">app/core/im/im-chats.js | API</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
  <script src="script/prettify/prettify.js"></script>
  <script src="script/manual.js"></script>
<link rel="stylesheet" href="./inject/css/0-vue.css"><link rel="stylesheet" href="./inject/css/0-app.css"><link rel="stylesheet" href="./inject/css/0-esdoc.css"><script src="./inject/script/0-custom.js"></script><meta name="description" content="&#x4F01;&#x4E1A;&#x5373;&#x65F6;&#x901A;&#x8BAF;&#x5E73;&#x53F0;"><meta property="twitter:card" content="summary"><meta property="twitter:title" content="API"><meta property="twitter:description" content="&#x4F01;&#x4E1A;&#x5373;&#x65F6;&#x901A;&#x8BAF;&#x5E73;&#x53F0;"></head>
<body class="layout-container" data-ice="rootContainer">

<header>
  <a href="./">Home</a>
  
  <a href="identifiers.html">Reference</a>
  <a href="source.html">Source</a>
  
  <div class="search-box">
  <span>
    <img src="./image/search.png">
    <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
  </span>
    <ul class="search-result"></ul>
  </div>
<a style="position:relative; top:3px;" href="https://github.com/easysoft/xuanxuan.git"><img width="20px" src="./image/github.png"></a></header>

<nav class="navigation" data-ice="nav"><div>
  <ul>
    
  <li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#components">components</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/app-avatar.js~AppAvatar.html">AppAvatar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/area-selector.js~AreaSelector.html">AreaSelector</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/avatar.js~Avatar.html">Avatar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/button.js~Button.html">Button</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/checkbox.js~Checkbox.html">Checkbox</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/click-outside-wrapper.js~ClickOutsideWrapper.html">ClickOutsideWrapper</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/display-container.js~DisplayContainer.html">DisplayContainer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/display-layer.js~DisplayLayer.html">DisplayLayer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/group-list.js~GroupList.html">GroupList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/heading.js~Heading.html">Heading</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/hotkey-input-control.js~HotkeyInputControl.html">HotkeyInputControl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/icon.js~MDIcon.html">MDIcon</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/image-cutter.js~ImageCutter.html">ImageCutter</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/image-holder.js~ImageHolder.html">ImageHolder</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/input-control.js~InputControl.html">InputControl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/list-item.js~ListItem.html">ListItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/pager.js~Pager.html">Pager</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/radio-group.js~RadioGroup.html">RadioGroup</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/radio.js~Radio.html">Radio</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/search-control.js~SearchControl.html">SearchControl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/select-box.js~Selectbox.html">Selectbox</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/spinner.js~Spinner.html">Spinner</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/tab-pane.js~TabPane.html">TabPane</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/components/tabs.js~Tabs.html">Tabs</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showContextMenu">showContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-displayGetRef">displayGetRef</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-displayHide">displayHide</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-displayRemove">displayRemove</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-displaySetStyle">displaySetStyle</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-displayShow">displayShow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showImageViewer">showImageViewer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showMessager">showMessager</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showAlert">showAlert</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showConfirm">showConfirm</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showModal">showModal</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showPrompt">showPrompt</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showPopover">showPopover</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#config">config</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateConfig">updateConfig</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-config">config</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core">core</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/events.js~Events.html">Events</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createCommandObject">createCommandObject</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-executeCommand">executeCommand</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-executeCommandLine">executeCommandLine</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCommandContext">getCommandContext</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-registerCommand">registerCommand</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setCommandContext">setCommandContext</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-unregisterCommand">unregisterCommand</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-addContextMenuCreator">addContextMenuCreator</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getMenuItemsForContext">getMenuItemsForContext</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isCreatorMatch">isCreatorMatch</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeContextMenuCreator">removeContextMenuCreator</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showContextMenu">showContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-tryAddDividerItem">tryAddDividerItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-tryRemoveLastDivider">tryRemoveLastDivider</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-deptsSorter">deptsSorter</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-forEachMember">forEachMember</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getAllMembers">getAllMembers</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getDept">getDept</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getDeptsTree">getDeptsTree</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getMember">getMember</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getRoleName">getRoleName</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-guessMember">guessMember</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initDepts">initDepts</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initMembers">initMembers</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onMembersChange">onMembersChange</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-queryMembers">queryMembers</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeMember">removeMember</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateMembers">updateMembers</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isMatchWindowCondition">isMatchWindowCondition</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onNoticeUpdate">onNoticeUpdate</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateNotice">updateNotice</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ready">ready</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-disableGlobalShortcut">disableGlobalShortcut</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-emitAppLinkClick">emitAppLinkClick</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-enableGlobalShortcut">enableGlobalShortcut</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getUrlMeta">getUrlMeta</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isAutoLoginNextTime">isAutoLoginNextTime</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isSmallScreen">isSmallScreen</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onAppLinkClick">onAppLinkClick</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onReady">onReady</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openUrl">openUrl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openUrlInApp">openUrlInApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openUrlInBrowser">openUrlInBrowser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openUrlInDialog">openUrlInDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-reloadWindow">reloadWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setTitle">setTitle</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showMobileChatsMenu">showMobileChatsMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-triggerReady">triggerReady</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-EVENT">EVENT</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-events">events</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-app">app</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-requestAttention">requestAttention</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-entryParams">entryParams</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-quit">quit</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core-db">core/db</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/db/database.js~Database.html">Database</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core-im">core/im</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-countChatMessages">countChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createChatMessage">createChatMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createCountMessagesTask">createCountMessagesTask</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-deleteLocalMessage">deleteLocalMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-forEachChat">forEachChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getAllChats">getAllChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getChat">getChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getChatCategories">getChatCategories</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getChatFiles">getChatFiles</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getChatMessages">getChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getChatMessagesInQueue">getChatMessagesInQueue</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getContactChat">getContactChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getContactsChats">getContactsChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getGroupsChats">getGroupsChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getLastActiveChat">getLastActiveChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getLastRecentChat">getLastRecentChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getOne2OneChatGid">getOne2OneChatGid</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getPublicChats">getPublicChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getRecentChats">getRecentChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initChats">initChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-loadChatMessages">loadChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onChatMessages">onChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onChatsInit">onChatsInit</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onFetchQueueFinish">onFetchQueueFinish</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-queryChats">queryChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeChat">removeChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-saveChatMessages">saveChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-searchChatMessages">searchChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-searchChats">searchChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateChatMessages">updateChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateChats">updateChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updatePublicChats">updatePublicChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-checkFileCache">checkFileCache</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-checkUploadFileSize">checkUploadFileSize</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-downloadFile">downloadFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-loadFiles">loadFiles</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-searchFiles">searchFiles</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-uploadFile">uploadFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-uploadImageFile">uploadImageFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateChatNotice">updateChatNotice</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createBoardChatMessage">createBoardChatMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createChat">createChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createChatWithMembers">createChatWithMembers</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createEmojiChatMessage">createEmojiChatMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createTextChatMessage">createTextChatMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-dimissChat">dimissChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-exitChat">exitChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-fetchChatsHistory">fetchChatsHistory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-fetchPublicChats">fetchPublicChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-handleInitChats">handleInitChats</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-handleReceiveChatMessages">handleReceiveChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isFetchingHistory">isFetchingHistory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-joinChat">joinChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-kickOfMemberFromChat">kickOfMemberFromChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onChatHistory">onChatHistory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onChatHistoryEnd">onChatHistoryEnd</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onChatHistoryStart">onChatHistoryStart</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onReceiveChatMessages">onReceiveChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onSendChatMessages">onSendChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-renameChat">renameChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendBoardChatMessage">sendBoardChatMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendChatMessage">sendChatMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendEmojiMessage">sendEmojiMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendFileMessage">sendFileMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendImageMessage">sendImageMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendSocketMessageForChat">sendSocketMessageForChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendTextMessage">sendTextMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setChatCategory">setChatCategory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setChatCommitters">setChatCommitters</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-toggleChatPublic">toggleChatPublic</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-toggleChatStar">toggleChatStar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-toggleHideChat">toggleHideChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-toggleMuteChat">toggleMuteChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateChatHistory">updateChatHistory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-activeChat">activeChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-activeLastChat">activeLastChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-captureAndCutScreenImage">captureAndCutScreenImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-chatDismissConfirm">chatDismissConfirm</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-chatExitConfirm">chatExitConfirm</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-chatRenamePrompt">chatRenamePrompt</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createCatureScreenContextMenuItems">createCatureScreenContextMenuItems</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createGroupChat">createGroupChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-emitChatSendboxFocus">emitChatSendboxFocus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getActivedCacheChatsGID">getActivedCacheChatsGID</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isActiveChat">isActiveChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-linkMembersInText">linkMembersInText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onActiveChat">onActiveChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onChatSendboxFocus">onChatSendboxFocus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onRenderChatMessageContent">onRenderChatMessageContent</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onSendContentToChat">onSendContentToChat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onSuggestSendImage">onSuggestSendImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-renameChatCategory">renameChatCategory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-renderChatMessageContent">renderChatMessageContent</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendContentToChat">sendContentToChat</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core-models">core/models</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/models/chat-message.js~ChatMessage.html">ChatMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/models/chat.js~Chat.html">Chat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/models/entity-schema.js~EntitySchema.html">EntitySchema</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/models/entity.js~Entity.html">Entity</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/models/file-data.js~FileData.html">FileData</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/models/member.js~Member.html">Member</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/models/notification-message.js~NotificationMessage.html">NotificationMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-dataURItoBlob">dataURItoBlob</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core-network">core/network</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/network/socket-message.js~SocketMessage.html">SocketMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/network/socket.js~AppSocket.html">AppSocket</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-checkUploadFileSize">checkUploadFileSize</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getRanzhiServerInfo">getRanzhiServerInfo</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-requestServerInfo">requestServerInfo</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core-profile">core/profile</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/profile/user-config.js~UserConfig.html">UserConfig</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/core/profile/user.js~User.html">User</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createUser">createUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCurrentUser">getCurrentUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getLastSavedUser">getLastSavedUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isCurrentUser">isCurrentUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onSwapUser">onSwapUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onUserConfigChange">onUserConfigChange</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onUserStatusChange">onUserStatusChange</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setCurrentUser">setCurrentUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isPasswordWithMD5Flag">isPasswordWithMD5Flag</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core-server">core/server</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-changeUserStatus">changeUserStatus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-fetchUserList">fetchUserList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-login">login</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-logout">logout</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onUserLogin">onUserLogin</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onUserLoginout">onUserLoginout</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-tryGetTempUserInfo">tryGetTempUserInfo</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-socket">socket</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#core-todo">core/todo</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createTodo">createTodo</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createTodoFromMessage">createTodoFromMessage</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#exts">exts</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/exts/app-extension.js~AppExtension.html">AppExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/exts/base-extension.js~Extension.html">Extension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/exts/extension-config.js~ExtensionConfig.html">ExtensionConfig</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/exts/opened-app.js~OpenedApp.html">OpenedApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/exts/plugin-extension.js~PluginExtension.html">PluginExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/exts/theme-extension.js~ThemeExtension.html">ThemeExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/exts/theme.js~Theme.html">Theme</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createExtension">createExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setExtensionUser">setExtensionUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getIndexOfInstallExtension">getIndexOfInstallExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getInstalledExtension">getInstalledExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getInstalledExtensions">getInstalledExtensions</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeInstalledExtension">removeInstalledExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeInstalledExtensionByName">removeInstalledExtensionByName</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-saveExtensionsToStore">saveExtensionsToStore</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-saveInstalledExtension">saveInstalledExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setOnInstalledExtensionChangeListener">setOnInstalledExtensionChangeListener</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-forEachExtension">forEachExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getAppExt">getAppExt</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getAppExts">getAppExts</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getExt">getExt</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getExts">getExts</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getPluginExt">getPluginExt</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getPluginExts">getPluginExts</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getThemeExt">getThemeExt</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getThemeExts">getThemeExts</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getTypeList">getTypeList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onExtensionChange">onExtensionChange</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-searchApps">searchApps</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-searchExts">searchExts</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createExtensionSavePath">createExtensionSavePath</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-installExtensionFromDevDir">installExtensionFromDevDir</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-installExtensionFromFile">installExtensionFromFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-loadExtensionReadmeFile">loadExtensionReadmeFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openInstallExtensionDialog">openInstallExtensionDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-reloadDevExtension">reloadDevExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setExtensionDisabled">setExtensionDisabled</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setExtensionEnabled">setExtensionEnabled</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-uninstallExtension">uninstallExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getExtensionUrlInspector">getExtensionUrlInspector</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getExtensionUrlOpener">getExtensionUrlOpener</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-loadExtensionsModules">loadExtensionsModules</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-applyTheme">applyTheme</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCurrentTheme">getCurrentTheme</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isCurrentTheme">isCurrentTheme</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-searchThemes">searchThemes</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setCurrentTheme">setCurrentTheme</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-closeAllApp">closeAllApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-closeApp">closeApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createAppContextMenu">createAppContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createOpenedAppContextMenu">createOpenedAppContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createSettingContextMenu">createSettingContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCurrentOpenedApp">getCurrentOpenedApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getOpenedApps">getOpenedApps</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-installExtension">installExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isCurrentOpenedApp">isCurrentOpenedApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isDefaultOpenedApp">isDefaultOpenedApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openApp">openApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openAppById">openAppById</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openAppWithUrl">openAppWithUrl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openNextApp">openNextApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showDevFolder">showDevFolder</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showExtensionDetailDialog">showExtensionDetailDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-tryUninstallExtension">tryUninstallExtension</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-APP_TYPES">APP_TYPES</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-TYPES">TYPES</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-defaultApp">defaultApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-exts">exts</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#exts-build-in">exts/build-in</a><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-exts">exts</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#exts-server">exts/server</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-detachServerExtensions">detachServerExtensions</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-fetchServerExtensions">fetchServerExtensions</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getEntryVisitUrl">getEntryVisitUrl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setServerOnChangeListener">setServerOnChangeListener</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#lang">lang</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-langError">langError</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-langFormat">langFormat</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-langString">langString</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateLangData">updateLangData</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-currentLangName">currentLangName</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#platform-browser">platform/browser</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/platform/browser/socket.js~Socket.html">Socket</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-writeHTML">writeHTML</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-writeText">writeText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showSaveDialog">showSaveDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onWindowFocus">onWindowFocus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openExternal">openExternal</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-isWindowFocus">isWindowFocus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-isWindowOpen">isWindowOpen</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-isWindowOpenAndFocus">isWindowOpenAndFocus</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#platform-browser-setting">platform/browser/setting</a><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-config">config</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#platform-common">platform/common</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-allUsers">allUsers</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getUser">getUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeUser">removeUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-saveUser">saveUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-userList">userList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-downloadFile">downloadFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getJSON">getJSON</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getJSONData">getJSONData</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getText">getText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getTextFromResponse">getTextFromResponse</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-postJSON">postJSON</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-postJSONData">postJSONData</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-postText">postText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-request">request</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setFetchObject">setFetchObject</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setOptionsFileter">setOptionsFileter</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-timeout">timeout</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-uploadFile">uploadFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createNotification">createNotification</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showNotification">showNotification</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showOpenDialog">showOpenDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-playSound">playSound</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#platform-electron">platform/electron</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/platform/electron/app-remote.js~AppRemote.html">AppRemote</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/platform/electron/events.js~Events.html">Events</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/platform/electron/get-url-meta.js~UrlMeta.html">UrlMeta</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/platform/electron/socket.js~Socket.html">Socket</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getNewImage">getNewImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-writeImageFromUrl">writeImageFromUrl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createContextMenu">createContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-popupContextMenu">popupContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showInputContextMenu">showInputContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showSelectionContextMenu">showSelectionContextMenu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-saveAsImageFromUrl">saveAsImageFromUrl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showRemoteOpenDialog">showRemoteOpenDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showSaveDialog">showSaveDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-geturlmeta">geturlmeta</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-base64ToBuffer">base64ToBuffer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createFromDataURL">createFromDataURL</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createFromPath">createFromPath</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-saveImage">saveImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-downloadFile">downloadFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-downloadFileWithRequest">downloadFileWithRequest</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-uploadFile">uploadFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-requestAttention">requestAttention</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setBadgeLabel">setBadgeLabel</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-updateTrayIcon">updateTrayIcon</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-callRemote">callRemote</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ipcOn">ipcOn</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ipcOnce">ipcOnce</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ipcSend">ipcSend</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onRequestQuit">onRequestQuit</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-remoteEmit">remoteEmit</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-remoteOff">remoteOff</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-remoteOn">remoteOn</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendToMainWindow">sendToMainWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sendToWindow">sendToWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-captureAndCutScreenImage">captureAndCutScreenImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-captureVideo">captureVideo</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openCaptureScreenWindow">openCaptureScreenWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-saveScreenshotImage">saveScreenshotImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-takeAllScreenshots">takeAllScreenshots</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-takeScreenshot">takeScreenshot</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-closeWindow">closeWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-copySelectText">copySelectText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createUserDataPath">createUserDataPath</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-flashTrayIcon">flashTrayIcon</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-focusWindow">focusWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getAppRoot">getAppRoot</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-hideWindow">hideWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isOpenAtLogin">isOpenAtLogin</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isWindowFocus">isWindowFocus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isWindowOpen">isWindowOpen</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isWindowOpenAndFocus">isWindowOpenAndFocus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-makeTmpFilePath">makeTmpFilePath</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onRequestQuit">onRequestQuit</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onWindowBlur">onWindowBlur</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onWindowFocus">onWindowFocus</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onWindowMinimize">onWindowMinimize</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-onWindowRestore">onWindowRestore</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-openDevTools">openDevTools</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-quit">quit</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-quitIM">quitIM</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-reloadWindow">reloadWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-selectAllText">selectAllText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setBadgeLabel">setBadgeLabel</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setOpenAtLogin">setOpenAtLogin</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setShowInTaskbar">setShowInTaskbar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setTrayTooltip">setTrayTooltip</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showAndFocusWindow">showAndFocusWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showQuitConfirmDialog">showQuitConfirmDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showWindow">showWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-initWebview">initWebview</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-app">app</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-readHTML">readHTML</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-readImage">readImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-readText">readText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-write">write</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-writeHTML">writeHTML</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-writeImage">writeImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-writeText">writeText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-events">events</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-platform">platform</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-browserWindow">browserWindow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-userDataPath">userDataPath</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#utils">utils</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/utils/color.js~Color.html">Color</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/utils/delay-action.js~DelayAction.html">DelayAction</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/utils/status.js~Status.html">Status</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/utils/status.js~StatusKeeper.html">StatusKeeper</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/utils/task-queue.js~TaskQueue.html">TaskQueue</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createDate">createDate</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createPhpTimestramp">createPhpTimestramp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-formatDate">formatDate</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-formatSpan">formatSpan</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getTimeBeforeDesc">getTimeBeforeDesc</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isSameDay">isSameDay</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isSameMonth">isSameMonth</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isSameYear">isSameYear</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isToday">isToday</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isYestoday">isYestoday</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-classes">classes</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-escape">escape</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getSearchParam">getSearchParam</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isWebUrl">isWebUrl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-linkify">linkify</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-rem">rem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-strip">strip</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-cutImage">cutImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getImageInfo">getImageInfo</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-limittimepromise">limittimepromise</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-mdifileicon">mdifileicon</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-pinyin">pinyin</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-plain">plain</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-matchScore">matchScore</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-formatKeyDecoration">formatKeyDecoration</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getKeyDecoration">getKeyDecoration</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isOnlyModifyKeys">isOnlyModifyKeys</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getCodeFromString">getCodeFromString</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-longShadow">longShadow</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-skinStyle">skinStyle</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-sortList">sortList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-clearStore">clearStore</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getStoreItem">getStoreItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getStoreLength">getStoreLength</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-removeStoreItem">removeStoreItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-setStoreItem">setStoreItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-storeForEach">storeForEach</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-storeGetAll">storeGetAll</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-formatBytes">formatBytes</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-formatString">formatString</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-ifEmptyStringThen">ifEmptyStringThen</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isEmptyString">isEmptyString</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isNotEmptyString">isNotEmptyString</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-timesequence">timesequence</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-TIME_DAY">TIME_DAY</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-renderer">renderer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-fileIcons">fileIcons</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-BYTE_UNITS">BYTE_UNITS</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views">views</a><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-replaceviews">replaceviews</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views-chats">views/chats</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-add-category.js~ChatAddCategory.html">ChatAddCategory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-avatar.js~ChatAvatar.html">ChatAvatar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-change-font-popover.js~ChangeFontView.html">ChangeFontView</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-committers-setting.js~ChatCommittersSetting.html">ChatCommittersSetting</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-create-groups.js~ChatCreateGroups.html">ChatCreateGroups</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-create.js~ChatCreateView.html">ChatCreateView</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-header.js~ChatHeader.html">ChatHeader</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-history.js~ChatHistory.html">ChatHistory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-invite.js~ChatInvite.html">ChatInvite</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-join-public.js~ChatJoinPublic.html">ChatJoinPublic</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-list-item.js~ChatListItem.html">ChatListItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-messages.js~ChatMessages.html">ChatMessages</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-search-result.js~ChatSearchResult.html">ChatSearchResult</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-sendbox-toolbar.js~ChatSendboxToolbar.html">ChatSendboxToolbar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-sendbox.js~ChatSendbox.html">ChatSendbox</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-sidebar-files.js~ChatSidebarFiles.html">ChatSidebarFiles</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-sidebar-peoples.js~ChatSidebarPeoples.html">ChatSidebarPeoples</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-sidebar-profile.js~ChatSidebarProfile.html">ChatSidebarProfile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-sidebar.js~ChatSidebar.html">ChatSidebar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-title.js~ChatTitle.html">ChatTitle</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chat-view.js~ChatView.html">ChatView</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chats-cache.js~ChatsCache.html">ChatsCache</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chats-dnd-container.js~ChatsDndContainer.html">ChatsDndContainer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chats-history.js~ChatsHistory.html">ChatsHistory</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/chats-suggest-panel.js~ChatsSuggestPanel.html">ChatsSuggestPanel</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/index.js~ChatsIndex.html">ChatsIndex</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/menu-contact-list.js~MenuContactList.html">MenuContactList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/menu-group-list.js~MenuGroupList.html">MenuGroupList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/menu-header.js~MenuHeader.html">MenuHeader</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/menu-list.js~MenuList.html">MenuList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/menu-recent-list.js~MenuRecentList.html">MenuRecentList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/menu-search-list.js~MenuSearchList.html">MenuSearchList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/menu.js~Menu.html">Menu</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-broadcast.js~MessageBroadcast.html">MessageBroadcast</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-content-card.js~MessageContentCard.html">MessageContentCard</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-content-file.js~MessageContentFile.html">MessageContentFile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-content-image.js~MessageContentImage.html">MessageContentImage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-content-text.js~MessageContentText.html">MessageContentText</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-content-url.js~MessageContentUrl.html">MessageContentUrl</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-divider.js~MessageDivider.html">MessageDivider</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-list-item.js~MessageListItem.html">MessageListItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/message-list.js~MessageList.html">MessageList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/chats/notification-message.js~NotificationMessage.html">NotificationMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showChangeFontPopover">showChangeFontPopover</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showChatCommittersSettingDialog">showChatCommittersSettingDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showChatInviteDialog">showChatInviteDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showChatTipPopoer">showChatTipPopoer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showChatsHistoryDialog">showChatsHistoryDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showMessagesPreviewDialog">showMessagesPreviewDialog</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views-common">views/common</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/about.js~About.html">About</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/build-info.js~BuildInfo.html">BuildInfo</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/draft-editor.js~DraftEditor.html">DraftEditor</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/file-list-item.js~FileListItem.html">FileListItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/file-list.js~FileList.html">FileList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/member-list-item.js~MemberListItem.html">MemberListItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/member-list.js~MemberList.html">MemberList</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/member-profile.js~MemberProfile.html">MemberProfile</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/status-dot.js~StatusDot.html">StatusDot</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/user-avatar.js~UserAvatar.html">UserAvatar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/user-change-password-dialog.js~UserChangePassword.html">UserChangePassword</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/user-list-item.js~UserListItem.html">UserListItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/user-setting.js~UserSetting.html">UserSetting</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/webview-frame.js~WebViewFrame.html">WebViewFrame</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/common/webview.js~WebView.html">WebView</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showAboutDialog">showAboutDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showEmojiPopover">showEmojiPopover</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showHotkeySettingDialog">showHotkeySettingDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showProfileDialog">showProfileDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showUserChangePasswordDialog">showUserChangePasswordDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showUserProfileDialog">showUserProfileDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showUserSettingDialog">showUserSettingDialog</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showWebviewDialog">showWebviewDialog</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views-exts">views/exts</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/app-extensions.js~AppExtensions.html">AppExtensions</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/app-files.js~AppFiles.html">AppFiles</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/app-home.js~AppHome.html">AppHome</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/app-themes.js~AppThemes.html">AppThemes</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/extension-detail.js~ExtensionDetail.html">ExtensionDetail</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/extension-list-item.js~ExtensionListItem.html">ExtensionListItem</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/index.js~ExtsIndex.html">ExtsIndex</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/exts/web-app.js~WebApp.html">WebApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showExtensionDetailDialog">showExtensionDetailDialog</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views-index">views/index</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/index/app-image-cutter.js~ImageCutterApp.html">ImageCutterApp</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/index/app-view.js~AppView.html">AppView</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/index/index.js~HomeIndex.html">HomeIndex</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views-login">views/login</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/login/form.js~LoginForm.html">LoginForm</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/login/index.js~LoginIndex.html">LoginIndex</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/login/swap-user.js~SwapUser.html">SwapUser</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showSwapUserDialog">showSwapUserDialog</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views-main">views/main</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/main/cache-container.js~CacheContainer.html">CacheContainer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/main/global-message.js~GlobalMessage.html">GlobalMessage</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/main/index.js~MainIndex.html">MainIndex</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/main/navbar.js~Navbar.html">Navbar</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/main/user-menu.js~UserMenu.html">UserMenu</a></span></span></li>
<li data-ice="doc"><a data-ice="dirPath" class="nav-dir-path" href="identifiers.html#views-todo">views/todo</a><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/app/views/todo/todo-editer.js~TodoEditor.html">TodoEditor</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-showTodoEditDialog">showTodoEditDialog</a></span></span></li>
</ul>
</div>
</nav>

<div class="content" data-ice="content"><h1 data-ice="title">app/core/im/im-chats.js</h1>
<pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">import Md5 from &apos;md5&apos;;
import Config from &apos;../../config&apos;;
import Chat from &apos;../models/chat&apos;;
import ChatMessage from &apos;../models/chat-message&apos;;
import NotificationMessage from &apos;../models/notification-message&apos;;
import profile from &apos;../profile&apos;;
import Events from &apos;../events&apos;;
import members from &apos;../members&apos;;
import db from &apos;../db&apos;;
import StringHelper from &apos;../../utils/string-helper&apos;;
import {getTimeBeforeDesc} from &apos;../../utils/date-helper&apos;;
import TaskQueue from &apos;../../utils/task-queue&apos;;
import timeSequence from &apos;../../utils/time-sequence&apos;;
import Lang from &apos;../../lang&apos;;
import Server from &apos;../server&apos;;

/**
 * &#x4ECE;&#x8FD0;&#x884C;&#x65F6;&#x914D;&#x7F6E;&#x8BFB;&#x53D6;&#x9ED8;&#x8BA4;&#x6BCF;&#x6B21;&#x52A0;&#x8F7D;&#x804A;&#x5929;&#x8BB0;&#x5F55;&#x6761;&#x76EE;&#x7684;&#x6570;&#x76EE;
 * @type {number}
 * @private
 */
const CHATS_LIMIT_DEFAULT = Config.ui[&apos;chat.flow.size&apos;];

/**
 * &#x9ED8;&#x8BA4;&#x6807;&#x8BB0;&#x4E3A;&#x6700;&#x8FD1;&#x804A;&#x5929;&#x6700;&#x5927;&#x8FC7;&#x53BB;&#x65F6;&#x95F4;&#xFF0C;&#x5355;&#x4F4D;&#x6BEB;&#x79D2;
 * @type {number}
 * @private
 */
const MAX_RECENT_TIME = 1000 * 60 * 60 * 24 * 7;

/**
 * &#x641C;&#x7D22;&#x6743;&#x503C;&#x8BA1;&#x7B97;&#x8868;
 * @type {Object}
 * @private
 */
const SEARCH_SCORE_MAP = {
    matchAll: 100,
    matchPrefix: 75,
    include: 50,
    similar: 10
};

/**
 * &#x4E8B;&#x4EF6;&#x540D;&#x79F0;&#x8868;
 * @type {Object}
 * @private
 */
const EVENT = {
    init: &apos;chats.init&apos;,
    messages: &apos;chats.messages&apos;,
    fetchQueueFinish: &apos;fetch.queue.finish.&apos;,
};

/**
 * &#x6240;&#x6709;&#x804A;&#x5929;&#x5B9E;&#x4F8B;&#x5BF9;&#x8C61;&#x8868;
 * @type {Object}
 * @private
 */
let chats = null;

/**
 * &#x516C;&#x5F00;&#x804A;&#x5929;&#x5B9E;&#x4F8B;&#x5BF9;&#x8C61;&#x8868;
 * @type {Object}
 * @private
 */
let publicChats = null;

/**
 * &#x7528;&#x4E8E;&#x65B9;&#x4FBF;&#x83B7;&#x53D6;&#x7528;&#x6237;&#x4FE1;&#x606F;&#x7684;&#x5BF9;&#x8C61;
 * @type {Object}
 * @private
 */
const app = {
    members,
    get user() {
        return profile.user;
    }
};

/**
 * &#x904D;&#x5386;&#x5F53;&#x524D;&#x7528;&#x6237;&#x7684;&#x6BCF;&#x4E00;&#x4E2A;&#x804A;&#x5929;
 * @param {Function(chat: Chat)} callback &#x904D;&#x5386;&#x56DE;&#x8C03;&#x51FD;&#x6570;
 * @return {void}
 */
export const forEachChat = (callback) =&gt; {
    if (chats) {
        Object.keys(chats).forEach(gid =&gt; {
            callback(chats[gid]);
        });
    }
};

/**
 * &#x6839;&#x636E; GID &#x83B7;&#x53D6;&#x804A;&#x5929;&#x5BF9;&#x8C61;
 * @param {string} gid &#x804A;&#x5929; GID
 * @return {Chat}
 */
export const getChat = (gid) =&gt; {
    if (!chats) {
        return null;
    }
    let chat = chats[gid];
    if (!chat &amp;&amp; gid.includes(&apos;&amp;&apos;)) {
        const chatMembers = gid.split(&apos;&amp;&apos;).map(x =&gt; Number.parseInt(x, 10));
        chat = new Chat({
            gid,
            members: chatMembers,
            createdBy: profile.user.account,
            type: Chat.TYPES.one2one
        });
        chat.updateMembersSet(members);
        updateChats(chat);
    }
    return chat;
};

/**
 * &#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x804A;&#x5929;&#x6D88;&#x606F;&#x5B9E;&#x4F8B;
 * @param {ChatMessage|Object} message &#x804A;&#x5929;&#x6D88;&#x606F;&#x5B58;&#x50A8;&#x5BF9;&#x8C61;
 * @return {ChatMessage}
 */
export const createChatMessage = message =&gt; {
    if (message instanceof ChatMessage) {
        return message;
    }
    if (message.type === &apos;notification&apos;) {
        message = NotificationMessage.create(message);
    } else {
        message = ChatMessage.create(message);
    }
    return message;
};

/**
 * &#x83B7;&#x53D6;&#x4E00;&#x5BF9;&#x4E00;&#x804A;&#x5929; GID
 * @param {Set|Array} members &#x4E00;&#x5BF9;&#x4E00;&#x804A;&#x5929;&#x6210;&#x5458; ID &#x5217;&#x8868;
 * @return {string}
 */
export const getOne2OneChatGid = members =&gt; {
    if (members instanceof Set) {
        members = Array.from(members);
    }
    if (members.length &gt; 2 || !members.length) {
        throw new Error(`Cannot build gid for members count with ${members.length}.`);
    } else if (members.length === 1) {
        members.push(profile.userId);
    }
    return members.map(x =&gt; x.id || x).sort().join(&apos;&amp;&apos;);
};

/**
 * &#x83B7;&#x53D6;&#x4E0A;&#x6B21;&#x6FC0;&#x6D3B;&#x7684;&#x804A;&#x5929;
 * @return {Chat}
 */
export const getLastActiveChat = () =&gt; {
    let lastChat = null;
    forEachChat(chat =&gt; {
        if (!lastChat || lastChat.lastActiveTime &lt; chat.lastActiveTime) {
            lastChat = chat;
        }
    });
    return lastChat;
};

/**
 * &#x4FDD;&#x5B58;&#x804A;&#x5929;&#x6D88;&#x606F;&#x5230;&#x6570;&#x636E;&#x5E93;
 * @param {Array.&lt;ChatMessage&gt;} messages &#x804A;&#x5929;&#x6D88;&#x606F;&#x5217;&#x8868;
 * @param {?Chat} chat &#x8981;&#x4FDD;&#x5B58;&#x7684;&#x804A;&#x5929;&#x5BF9;&#x8C61;
 * @return {Promise}
 */
export const saveChatMessages = (messages, chat) =&gt; {
    if (!Array.isArray(messages)) {
        messages = [messages];
    }

    Events.emit(EVENT.messages, messages);
    if (chat) {
        updateChats(chat);
    }

    // Save messages to database
    if (messages.length) {
        return db.database.chatMessages.bulkPut(messages.map(x =&gt; x.plain()));
    }
    return Promise.resolve(0);
};

/**
 * &#x66F4;&#x65B0;&#x7F13;&#x5B58;&#x4E2D;&#x7684;&#x804A;&#x5929;&#x6D88;&#x606F;
 * @param {Object[]} messages &#x804A;&#x5929;&#x6D88;&#x606F;&#x5217;&#x8868;
 * @param {boolean} [muted=false] &#x662F;&#x5426;&#x5FFD;&#x7565;&#x672A;&#x8BFB;&#x63D0;&#x793A;
 * @param {boolean} [skipOld=false] &#x662F;&#x5426;&#x8DF3;&#x8FC7;&#x5DF2;&#x66F4;&#x65B0;&#x7684;&#x6D88;&#x606F;
 * @return {Promise}
 */
export const updateChatMessages = (messages, muted = false, skipOld = false) =&gt; {
    if (skipOld === true) {
        skipOld = 60 * 1000 * 60 * 24;
    }
    if (!Array.isArray(messages)) {
        messages = [messages];
    }
    const chatsMessages = {};
    const messagesForUpdate = messages.map(message =&gt; {
        message = createChatMessage(message);
        if (!chatsMessages[message.cgid]) {
            chatsMessages[message.cgid] = [message];
        } else {
            chatsMessages[message.cgid].push(message);
        }
        return message;
    });

    const updatedChats = {};
    Object.keys(chatsMessages).forEach(cgid =&gt; {
        const chat = getChat(cgid);
        if (chat &amp;&amp; (chat.id || chat.isRobot) &amp;&amp; chat.isMember(profile.userId)) {
            chat.addMessages(chatsMessages[cgid], profile.userId, muted, skipOld);
            if (muted) {
                chat.muteNotice();
            }
            updatedChats[cgid] = chat;
        }
    });

    updateChats(updatedChats);

    return saveChatMessages(messagesForUpdate);
};

/**
 * &#x79FB;&#x9664;&#x672C;&#x5730;&#xFF08;&#x672A;&#x53D1;&#x9001;&#x6210;&#x529F;&#xFF09;&#x7684;&#x804A;&#x5929;&#x6D88;&#x606F;
 * @param {ChatMessage} message &#x8981;&#x79FB;&#x9664;&#x7684;&#x804A;&#x5929;&#x6D88;&#x606F;
 * @return {Promise}
 */
export const deleteLocalMessage = (message) =&gt; {
    if (message.id) {
        return Promise.reject(new Error(&apos;Cannot delete a remote chat message.&apos;));
    }
    const chat = getChat(message.cgid);
    chat.removeMessage(message.gid);
    Events.emitDataChange({chats: {[chat.gid]: chat}});
    return db.database.chatMessages.delete(message.gid);
};

/**
 * &#x83B7;&#x53D6;&#x804A;&#x5929;&#x6D88;&#x606F;&#x6570;&#x76EE;
 * @param {string} cgid &#x804A;&#x5929; GID
 * @param {function(message: ChatMessage)} filter &#x8FC7;&#x6EE4;&#x56DE;&#x8C03;&#x51FD;&#x6570;
 * @return {Promise&lt;number&gt;}
 */
export const countChatMessages = (cgid, filter) =&gt; {
    let collection = db.database.chatMessages.where({cgid});
    if (filter) {
        collection = collection.and(filter);
    }
    return collection.count();
};

/**
 * &#x83B7;&#x53D6;&#x804A;&#x5929;&#x6D88;&#x606F;
 * @param {Chat} chat &#x804A;&#x5929;&#x5BF9;&#x8C61;
 * @param {function(message: ChatMessage)} queryCondition &#x67E5;&#x8BE2;&#x8FC7;&#x6EE4;&#x51FD;&#x6570;
 * @param {number} [limit=CHATS_LIMIT_DEFAULT] &#x6700;&#x591A;&#x8FD4;&#x56DE;&#x6570;&#x76EE;
 * @param {number} [offset=0] &#x8981;&#x7565;&#x8FC7;&#x7684;&#x6570;&#x76EE;
 * @param {boolean} [reverse=true] &#x662F;&#x5426;&#x5DF2;&#x5012;&#x5E8F;&#x8FD4;&#x56DE;
 * @param {boolean} [skipAdd=true] &#x662F;&#x5426;&#x5FFD;&#x7565;&#x6DFB;&#x52A0;&#x5230;&#x804A;&#x5929;&#x6D88;&#x606F;&#x7F13;&#x5B58;&#x4E2D;
 * @param {boolean} [rawData=false] &#x662F;&#x5426;&#x8FD4;&#x56DE;&#x539F;&#x59CB;&#x6570;&#x636E;&#x800C;&#x4E0D;&#x662F; ChatMessage
 * @param {boolean} [returnCount=false] &#x662F;&#x5426;&#x4EC5;&#x4EC5;&#x8FD4;&#x56DE;&#x6570;&#x76EE;
 * @return {Promise}
 */
export const getChatMessages = (chat, queryCondition, limit = CHATS_LIMIT_DEFAULT, offset = 0, reverse = true, skipAdd = true, rawData = false, returnCount = false) =&gt; {
    // console.log(&apos;getChatMessages&apos;, {chat, queryCondition, limit, offset, reverse, skipAdd, rawData, returnCount});
    if (!db.database || !db.database.chatMessages) {
        return Promise.resolve([]);
    }
    const cgid = chat ? chat.gid : null;
    let collection = db.database.chatMessages.orderBy(&apos;id&apos;).and(x =&gt; {
        return (!cgid || x.cgid === cgid) &amp;&amp; (!queryCondition || queryCondition(x));
    });
    if (reverse) {
        collection = collection.reverse();
    }
    if (offset) {
        collection = collection.offset(offset);
    }
    if (limit) {
        collection = collection.limit(limit);
    }
    if (returnCount) {
        return collection.count(count =&gt; {
            return Promise.resolve({gid: cgid, count, chat});
        });
    }
    return collection.toArray(chatMessages =&gt; {
        if (chatMessages &amp;&amp; chatMessages.length) {
            const result = rawData ? chatMessages : chatMessages.map(createChatMessage);
            if (!skipAdd &amp;&amp; cgid) {
                chat.addMessages(result, profile.userId, true);
                Events.emitDataChange({chats: {[cgid]: chat}});
            }
            return Promise.resolve(result);
        }
        return Promise.resolve([]);
    });
};

/**
 * &#x5F53;&#x524D;&#x804A;&#x5929;&#x6D88;&#x606F;&#x67E5;&#x8BE2;&#x4EFB;&#x52A1;&#x961F;&#x5217;&#x662F;&#x5426;&#x6B63;&#x5FD9;
 * @type {boolean}
 * @private
 */
let isGetChatMessagesQueueBusy = false;

/**
 * &#x5F53;&#x524D;&#x804A;&#x5929;&#x6D88;&#x606F;&#x67E5;&#x8BE2;&#x961F;&#x5217;
 * @type {Array}
 * @private
 */
const fetchChatMessagesQueue = [];

/**
 * &#x76D1;&#x542C;&#x5F53;&#x6307;&#x5B9A; ID &#x7684;&#x6D88;&#x606F;&#x67E5;&#x8BE2;&#x4EFB;&#x52A1;&#x5B8C;&#x6210;&#x4E8B;&#x4EF6;
 * @param {string} queueId &#x804A;&#x5929;&#x6D88;&#x606F;&#x67E5;&#x8BE2;&#x4EFB;&#x52A1; ID
 * @param {Function} listener &#x4E8B;&#x4EF6;&#x56DE;&#x8C03;&#x51FD;&#x6570;
 * @return {Symbol}
 */
export const onFetchQueueFinish = (queueId, listener) =&gt; {
    return Events.once(`${EVENT.fetchQueueFinish}${queueId}`, listener);
};

/**
 * &#x5904;&#x7406;&#x804A;&#x5929;&#x6D88;&#x606F;&#x67E5;&#x8BE2;&#x961F;&#x5217;&#x4EFB;&#x52A1;
 * @private
 * @return {void}
 */
const processChatMessageQueue = () =&gt; {
    if (isGetChatMessagesQueueBusy) {
        return;
    }
    if (fetchChatMessagesQueue.length) {
        isGetChatMessagesQueueBusy = true;
        const queueData = fetchChatMessagesQueue.pop();
        const {
            queueId, chat, queryCondition, limit, offset, reverse, skipAdd, rawData, returnCount,
        } = queueData;
        const handleChatMessageQueueResult = result =&gt; {
            Events.emit(`${EVENT.fetchQueueFinish}${queueId}`, result);
            isGetChatMessagesQueueBusy = false;
            processChatMessageQueue();
        };
        getChatMessages(getChat(chat), queryCondition, limit, offset, reverse, skipAdd, rawData, returnCount).then(handleChatMessageQueueResult).catch(handleChatMessageQueueResult);
    }
};

/**
 * &#x901A;&#x8FC7;&#x6D88;&#x606F;&#x67E5;&#x8BE2;&#x4EFB;&#x52A1;&#x961F;&#x5217;&#x83B7;&#x53D6;&#x804A;&#x5929;&#x6D88;&#x606F;
 * @param {Chat} chat &#x804A;&#x5929;&#x5BF9;&#x8C61;
 * @param {function(message: ChatMessage)} queryCondition &#x67E5;&#x8BE2;&#x8FC7;&#x6EE4;&#x51FD;&#x6570;
 * @param {number} [limit=CHATS_LIMIT_DEFAULT] &#x6700;&#x591A;&#x8FD4;&#x56DE;&#x6570;&#x76EE;
 * @param {number} [offset=0] &#x8981;&#x7565;&#x8FC7;&#x7684;&#x6570;&#x76EE;
 * @param {boolean} [reverse=true] &#x662F;&#x5426;&#x5DF2;&#x5012;&#x5E8F;&#x8FD4;&#x56DE;
 * @param {boolean} [skipAdd=true] &#x662F;&#x5426;&#x5FFD;&#x7565;&#x6DFB;&#x52A0;&#x5230;&#x804A;&#x5929;&#x6D88;&#x606F;&#x7F13;&#x5B58;&#x4E2D;
 * @param {boolean} [rawData=false] &#x662F;&#x5426;&#x8FD4;&#x56DE;&#x539F;&#x59CB;&#x6570;&#x636E;&#x800C;&#x4E0D;&#x662F; ChatMessage
 * @param {boolean} [returnCount=false] &#x662F;&#x5426;&#x4EC5;&#x4EC5;&#x8FD4;&#x56DE;&#x6570;&#x76EE;
 * @return {Promise}
 */
export const getChatMessagesInQueue = (chat, queryCondition, limit = CHATS_LIMIT_DEFAULT, offset = 0, reverse = true, skipAdd = true, rawData = false, returnCount = false) =&gt; {
    return new Promise((resolve, reject) =&gt; {
        const queueData = {
            chat: chat.gid, queryCondition, limit, offset, reverse, skipAdd, rawData, returnCount,
        };
        const queueId = Md5(JSON.stringify(queueData));
        queueData.queueId = queueId;
        if (!isGetChatMessagesQueueBusy || fetchChatMessagesQueue.every(x =&gt; x.queueId !== queueId)) {
            fetchChatMessagesQueue.push(queueData);
        }
        onFetchQueueFinish(queueId, result =&gt; {
            if (result instanceof Error) {
                reject(result);
            } else {
                resolve(result);
            }
        });
        processChatMessageQueue();
    });
};

/**
 * &#x52A0;&#x8F7D;&#x6307;&#x5B9A;&#x804A;&#x5929;&#x6D88;&#x606F;
 *
 * @param {Chat} chat &#x8981;&#x52A0;&#x8F7D;&#x7684;&#x804A;&#x5929;&#x5B9E;&#x4F8B;
 * @param {boolean} [inQueue=true] &#x662F;&#x5426;&#x901A;&#x8FC7;&#x4EFB;&#x52A1;&#x961F;&#x5217;&#x6A21;&#x5F0F;
 * @return {Promise}
 */
export const loadChatMessages = (chat, inQueue = true) =&gt; {
    let {loadingOffset} = chat;
    if (loadingOffset === true) {
        return Promise.reject();
    }
    if (!loadingOffset) {
        loadingOffset = 0;
    }
    const limit = loadingOffset ? 20 : CHATS_LIMIT_DEFAULT;
    return (inQueue ? getChatMessagesInQueue : getChatMessages)(chat, null, limit, loadingOffset, true, false).then(chatMessages =&gt; {
        if (!chatMessages || chatMessages.length &lt; limit) {
            loadingOffset = true;
        } else {
            loadingOffset += limit;
        }
        chat.loadingOffset = loadingOffset;
        return Promise.resolve(chatMessages);
    });
};

/**
 * &#x641C;&#x7D22;&#x6307;&#x5B9A;&#x804A;&#x5929;&#x8BB0;&#x5F55;
 * @param {Chat} chat &#x8981;&#x641C;&#x7D22;&#x7684;&#x804A;&#x5929;&#x5B9E;&#x4F8B;
 * @param {string} searchKeys &#x641C;&#x7D22;&#x5173;&#x952E;&#x8BCD;&#xFF0C;&#x591A;&#x4E2A;&#x5173;&#x952E;&#x5B57;&#x4F7F;&#x7528;&#x7A7A;&#x683C;&#x5206;&#x9694;
 * @param {number} minDate &#x6700;&#x5C0F;&#x65E5;&#x671F;&#x65F6;&#x95F4;&#x6233;&#xFF0C;&#x53EA;&#x641C;&#x7D22;&#x6B64;&#x65E5;&#x671F;&#x4E4B;&#x540E;&#x7684;&#x804A;&#x5929;&#x8BB0;&#x5F55;
 * @param {bool} [returnCount=false] &#x662F;&#x5426;&#x53EA;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x6570;&#x76EE;
 * @return {Promise}
 */
export const searchChatMessages = (chat, searchKeys = &apos;&apos;, minDate = 0, returnCount = false) =&gt; {
    if (typeof minDate === &apos;string&apos;) {
        minDate = getTimeBeforeDesc(minDate);
    }
    const keys = searchKeys.toLowerCase().split(&apos; &apos;);
    return getChatMessages(chat, msg =&gt; {
        if (!msg.id || (minDate &amp;&amp; msg.date &lt; minDate)) {
            return false;
        }
        for (const key of keys) {
            if (key === &apos;[image]&apos;) {
                if (msg.contentType !== &apos;image&apos;) {
                    return false;
                }
            } else if (key === &apos;[file]&apos;) {
                if (msg.contentType !== &apos;file&apos;) {
                    return false;
                }
            } else if (msg.contentType === &apos;text&apos; || msg.content.length &lt; 200) {
                if (!msg.content || !msg.content.toLowerCase().includes(key)) {
                    return false;
                }
            } else {
                return false;
            }
        }
        return true;
    }, 0, 0, true, true, false, returnCount);
};

/**
 * &#x521B;&#x5EFA;&#x83B7;&#x53D6;&#x6D88;&#x606F;&#x8BB0;&#x5F55;&#x6570;&#x76EE;&#x961F;&#x5217;&#x4EFB;&#x52A1;
 * @param {Array.&lt;Chat&gt;} countChats &#x8981;&#x83B7;&#x53D6;&#x6D88;&#x606F;&#x8BB0;&#x5F55;&#x6570;&#x76EE;&#x7684;&#x804A;&#x5929;&#x5BF9;&#x8C61;&#x5B9E;&#x4F8B;
 * @param {string} searchKeys &#x641C;&#x7D22;&#x5173;&#x952E;&#x5B57;
 * @param {number} minDateDesc &#x6700;&#x5C0F;&#x65E5;&#x671F;&#x63CF;&#x8FF0;
 * @return {TaskQueue}
 */
export const createCountMessagesTask = (countChats, searchKeys, minDateDesc = &apos;&apos;) =&gt; {
    const minDate = minDateDesc ? getTimeBeforeDesc(minDateDesc) : 0;
    const taskQueue = new TaskQueue();
    taskQueue.add(countChats.map(chat =&gt; {
        return {func: searchChatMessages.bind(null, chat, searchKeys, minDate, true), chat};
    }));
    return taskQueue;
};

/**
 * &#x66F4;&#x65B0;&#x7F13;&#x5B58;&#x4E2D;&#x7684;&#x804A;&#x5929;&#x5BF9;&#x8C61;&#x5B9E;&#x4F8B;
 * @param {Array.&lt;Chat|Object&gt;} chatArr &#x8981;&#x66F4;&#x65B0;&#x7684;&#x804A;&#x5929;&#x5BF9;&#x8C61;
 * @return {void}
 */
export const updateChats = (chatArr) =&gt; {
    if (!chatArr) return;

    if (!Array.isArray(chatArr)) {
        if (chatArr instanceof Chat) {
            chatArr = [chatArr];
        }
    }

    let newchats = null;
    if (Array.isArray(chatArr) &amp;&amp; chatArr.length) {
        newchats = {};
        chatArr.forEach(chat =&gt; {
            chat = Chat.create(chat);
            if (chat.visible) {
                newchats[chat.gid] = chat;
            }
        });
    } else {
        newchats = chatArr;
    }

    if (newchats &amp;&amp; Object.keys(newchats).length) {
        Object.assign(chats, newchats);
        Events.emitDataChange({chats: newchats});
    }
};

/**
 * &#x521D;&#x59CB;&#x5316;&#x7F13;&#x5B58;&#x4E2D;&#x7684;&#x804A;&#x5929;&#x5BF9;&#x8C61;&#x5B9E;&#x4F8B;
 * @param {Array.&lt;Chat|Object&gt;} chatArr &#x8981;&#x66F4;&#x65B0;&#x7684;&#x804A;&#x5929;&#x5BF9;&#x8C61;
 * @param {function(chat: Chat)} eachCallback &#x904D;&#x5386;&#x6BCF;&#x4E00;&#x4E2A;&#x88AB;&#x7F13;&#x5B58;&#x7684;&#x804A;&#x5929;&#x5BF9;&#x8C61;&#x56DE;&#x8C03;&#x51FD;&#x6570;
 * @return {void}
 */
export const initChats = (chatArr, eachCallback) =&gt; {
    publicChats = null;
    chats = {};
    if (chatArr &amp;&amp; chatArr.length) {
        chatArr.push({
            gid: &apos;littlexx&apos;,
            name: Lang.string(&apos;common.littlexx&apos;),
            type: &apos;robot&apos;,
            lastActiveTime: new Date().getTime() - Math.floor(MAX_RECENT_TIME / 2),
            members: [profile.user.id]
        });
        updateChats(chatArr);
        forEachChat(chat =&gt; {
            if (chat.isOne2One) {
                const member = chat.getTheOtherOne(app);
                if (member.temp) {
                    chat.isDeleteOne2One = true;
                    Server.tryGetTempUserInfo(member.id);
                }
            }
            chat.renewUpdateId();
            delete chat.loadingOffset;
            if (eachCallback) {
                eachCallback(chat);
            }
        });
        Events.emit(EVENT.init, chats);
    }
};

/**
 * &#x83B7;&#x53D6;&#x7F13;&#x5B58;&#x4E2D;&#x6240;&#x6709;&#x804A;&#x5929;&#x5BF9;&#x8C61;&#x5B9E;&#x4F8B;
 * @return {Array.&lt;Chat&gt;}
 */
export const getAllChats = () =&gt; {
    return chats ? Object.keys(chats).map(x =&gt; chats[x]) : [];
};

/**
 * &#x4ECE;&#x7F13;&#x5B58;&#x4E2D;&#x67E5;&#x8BE2;&#x804A;&#x5929;&#x5B9E;&#x4F8B;
 * @param {Object|Function(chat: Chat)|Array&lt;Function(chat: Chat)&gt;} condition &#x67E5;&#x8BE2;&#x6761;&#x4EF6;
 * @param {*} sortList &#x662F;&#x5426;&#x5BF9;&#x7ED3;&#x679C;&#x8FDB;&#x884C;&#x6392;&#x5E8F;
 * @return {Array.&lt;Chat&gt;}
 */
export const queryChats = (condition, sortList) =&gt; {
    if (!chats) {
        return [];
    }
    let result = null;
    if (typeof condition === &apos;object&apos;) {
        const conditionObj = condition;
        const conditionKeys = Object.keys(conditionObj);
        condition = chat =&gt; {
            for (const key of conditionKeys) {
                if (conditionObj[key] !== chat[key]) {
                    return false;
                }
            }
            return true;
        };
    }
    if (typeof condition === &apos;function&apos;) {
        result = [];
        forEachChat(chat =&gt; {
            if (condition(chat)) {
                result.push(chat);
            }
        });
    } else if (Array.isArray(condition)) {
        result = [];
        condition.forEach(x =&gt; {
            const chat = getChat(x);
            if (chat) {
                result.push(chat);
            }
        });
    } else {
        result = getAllChats();
    }
    if (sortList &amp;&amp; result &amp;&amp; result.length) {
        Chat.sort(result, sortList, app);
    }
    return result || [];
};

/**
 * &#x83B7;&#x53D6;&#x6700;&#x8FD1;&#x6FC0;&#x6D3B;&#x7684;&#x804A;&#x5929;
 * @param {bool} [includeStar=true] &#x662F;&#x5426;&#x5305;&#x542B;&#x6536;&#x85CF;&#x7684;&#x804A;&#x5929;
 * @param {boolean|String|Function} sortList &#x662F;&#x5426;&#x6392;&#x5E8F;&#x6216;&#x8005;&#x6307;&#x5B9A;&#x6392;&#x5E8F;&#x89C4;&#x5219;
 * @return {Array.&lt;Chat&gt;}
 */
export const getRecentChats = (includeStar = true, sortList = true) =&gt; {
    const all = getAllChats();
    let recents = null;
    if (all.length &lt; 4) {
        recents = all;
    } else {
        const now = new Date().getTime();
        recents = all.filter(chat =&gt; {
            return (chat.noticeCount || (!chat.mute &amp;&amp; !chat.hidden)) &amp;&amp; !chat.isDeleteOne2One &amp;&amp; !chat.isDismissed &amp;&amp; (chat.noticeCount || (includeStar &amp;&amp; chat.star) || (chat.lastActiveTime &amp;&amp; (now - chat.lastActiveTime) &lt;= MAX_RECENT_TIME));
        });
        if (!recents.length) {
            recents = all.filter(chat =&gt; chat.isSystem);
        }
    }
    if (sortList) {
        Chat.sort(recents, sortList, app);
    }
    return recents;
};

/**
 * &#x83B7;&#x53D6;&#x6700;&#x8FD1;&#x4E00;&#x6B21;&#x6FC0;&#x6D3B;&#x7684;&#x804A;&#x5929;
 * @return {Chat}
 */
export const getLastRecentChat = () =&gt; {
    let lastActiveTime = 0;
    let lastRecentChat = null;
    forEachChat(chat =&gt; {
        if (!chat.isDeleteOne2One &amp;&amp; !chat.isDismissed &amp;&amp; lastActiveTime &lt; chat.lastActiveTime) {
            // eslint-disable-next-line prefer-destructuring
            lastActiveTime = chat.lastActiveTime;
            lastRecentChat = chat;
        }
    });
    if (!lastRecentChat) {
        lastRecentChat = getAllChats().find(x =&gt; x.isSystem);
    }
    return lastRecentChat;
};

/**
 * &#x83B7;&#x53D6;&#x4E0E;&#x6307;&#x5B9A;&#x8054;&#x7CFB;&#x4EBA;&#x5173;&#x8054;&#x7684;&#x4E00;&#x5BF9;&#x4E00;&#x804A;&#x5929;
 * @param {Member|Object} member &#x8054;&#x7CFB;&#x4EBA;
 * @return {Chat}
 */
export const getContactChat = (member) =&gt; {
    const membersId = [member.id, profile.user.id].sort();
    const gid = membersId.join(&apos;&amp;&apos;);
    return getChat(gid);
};

/**
 * &#x83B7;&#x53D6;&#x4E00;&#x5BF9;&#x4E00;&#x804A;&#x5929;
 * @param {boolean|String|Function} sortList &#x662F;&#x5426;&#x6392;&#x5E8F;&#x6216;&#x8005;&#x6307;&#x5B9A;&#x6392;&#x5E8F;&#x89C4;&#x5219;
 * @param {boolean} [groupedBy=false] &#x662F;&#x5426;&#x6309;&#x5206;&#x7EC4;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;
 * @return {Object|Array.&lt;Chat&gt;}
 */
export const getContactsChats = (sortList = &apos;onlineFirst&apos;, groupedBy = false) =&gt; {
    const {user} = profile;
    let contactChats = [];
    if (!user) {
        return contactChats;
    }

    const contactChatMap = {};
    members.forEach(member =&gt; {
        if (member.id !== profile.user.id) {
            contactChatMap[member.id] = getContactChat(member, true);
        }
    });

    queryChats(x =&gt; x.isOne2One).forEach(theChat =&gt; {
        if (!contactChatMap[theChat.id]) {
            const member = theChat.getTheOtherOne(app);
            contactChatMap[member.id] = theChat;
        }
    });

    contactChats = Object.keys(contactChatMap).map(x =&gt; contactChatMap[x]);

    if (groupedBy === &apos;role&apos;) {
        const groupedContactChats = {};
        contactChats.forEach(chat =&gt; {
            const member = chat.getTheOtherOne(app);
            const isDeleteOne2One = member.isDeleted;
            if (isDeleteOne2One) {
                chat.isDeleteOne2One = isDeleteOne2One;
            }
            const isMemberOnline = member.isOnline;
            const role = member.role || &apos;&apos;;
            const groupName = isDeleteOne2One ? Lang.string(&apos;chats.menu.group.deleted&apos;) : members.getRoleName(role);
            const groupId = isDeleteOne2One ? &apos;_delete&apos; : role;
            if (!groupedContactChats[groupId]) {
                groupedContactChats[groupId] = {
                    id: groupId, title: groupName, list: [chat], onlineCount: isMemberOnline ? 1 : 0
                };
                if (isDeleteOne2One) {
                    groupedContactChats[groupId].system = true;
                }
            } else {
                groupedContactChats[groupId].list.push(chat);
                if (isMemberOnline) {
                    groupedContactChats[groupId].onlineCount += 1;
                }
            }
        });
        const orders = profile.user.config.contactsOrderRole;
        return Object.keys(groupedContactChats).map(role =&gt; {
            const group = groupedContactChats[role];
            if (sortList) {
                Chat.sort(group.list, sortList, app);
            }
            return group;
        }).sort((g1, g2) =&gt; {
            let result = (g2.system ? 1 : 0) - (g1.system ? 1 : 0);
            if (result === 0) {
                result = (g1.id ? (orders[g1.id] || 1) : 0) - (g2.id ? (orders[g2.id] || 1) : 0);
            }
            if (result === 0) {
                result = g1.id &gt; g2.id ? 1 : 0;
            }
            return -result;
        });
    }
    if (groupedBy === &apos;dept&apos;) {
        const groupsMap = {};
        Object.keys(members.depts).forEach(deptId =&gt; {
            const dept = members.depts[deptId];
            groupsMap[deptId] = {
                id: deptId,
                title: dept.name,
                dept,
                list: [],
                onlineCount: 0
            };
        });
        contactChats.forEach(chat =&gt; {
            const member = chat.getTheOtherOne(app);
            const isDeleteOne2One = member.isDeleted;
            if (isDeleteOne2One) {
                chat.isDeleteOne2One = isDeleteOne2One;
            }
            const isMemberOnline = member.isOnline;
            const groupId = isDeleteOne2One ? &apos;_delete&apos; : member.dept;
            if (groupsMap[groupId]) {
                groupsMap[groupId].list.push(chat);
                if (isMemberOnline) {
                    groupsMap[groupId].onlineCount += 1;
                }
            } else {
                const dept = members.getDept(groupId);
                const groupName = isDeleteOne2One ? Lang.string(&apos;chats.menu.group.deleted&apos;) : (dept &amp;&amp; dept.name);
                groupsMap[groupId] = {
                    id: groupId,
                    title: groupName,
                    dept,
                    list: [chat],
                    onlineCount: isMemberOnline ? 1 : 0
                };
                if (isDeleteOne2One) {
                    groupsMap[groupId].system = true;
                }
            }
        });
        const groupArr = Object.keys(groupsMap).map(deptId =&gt; {
            const group = groupsMap[deptId];
            const {dept} = group;
            if (dept) {
                if (dept.children) {
                    group.children = dept.children.map(x =&gt; groupsMap[x.id]);
                }
                if (dept.parents) {
                    group.hasParent = true;
                }
            }
            group.type = &apos;group&apos;;
            group.order = dept &amp;&amp; dept.order;
            if (sortList) {
                Chat.sort(group.list, sortList, app);
            }
            return group;
        });
        const deptsSorter = (d1, d2) =&gt; {
            let result = (d1.system ? 1 : 0) - (d2.system ? 1 : 0);
            if (result === 0) {
                result = (d2.list &amp;&amp; d2.list.length ? 1 : 0) - (d1.list &amp;&amp; d1.list.length ? 1 : 0);
            }
            if (result === 0) {
                result = (d2.dept ? 1 : 0) - (d1.dept ? 1 : 0);
            }
            return result !== 0 ? result : members.deptsSorter(d1, d2);
        };
        return groupArr.map(x =&gt; {
            if (x.children) {
                x.children.sort(deptsSorter);
                const list = x.children;
                if (x.list) {
                    list.push(...x.list);
                }
                x.list = list;
            }
            if (x.type === &apos;group&apos; &amp;&amp; x.dept &amp;&amp; x.dept.children &amp;&amp; x.dept.children.length === x.list.length) {
                x.onlySubGroup = true;
            }
            return x;
        }).filter(x =&gt; !x.hasParent).sort(deptsSorter);
    }
    if (groupedBy === &apos;category&apos;) {
        const groupedChats = {};
        contactChats.forEach(chat =&gt; {
            const member = chat.getTheOtherOne(app);
            const isDeleteOne2One = member.isDeleted;
            if (isDeleteOne2One) {
                chat.isDeleteOne2One = isDeleteOne2One;
            }
            const categoryId = isDeleteOne2One ? &apos;_delete&apos; : (chat.category || &apos;&apos;);
            const categoryName = isDeleteOne2One ? Lang.string(&apos;chats.menu.group.deleted&apos;) : (categoryId || user.config.contactsDefaultCategoryName);
            const isMemberOnline = member.isOnline;
            if (!groupedChats[categoryId]) {
                groupedChats[categoryId] = {
                    id: categoryId, title: categoryName || Lang.string(&apos;chats.menu.group.default&apos;), list: [chat], onlineCount: isMemberOnline ? 1 : 0,
                };
                if (isDeleteOne2One) {
                    groupedChats[categoryId].system = true;
                }
            } else {
                groupedChats[categoryId].list.push(chat);
                if (isMemberOnline) {
                    groupedChats[categoryId].onlineCount += 1;
                }
            }
        });
        const categories = user.config.contactsCategories;
        let needSaveOrder = false;
        const orderedGroups = Object.keys(groupedChats).map(categoryId =&gt; {
            const group = groupedChats[categoryId];
            let savedCategory = categories[categoryId];
            if (!savedCategory) {
                const order = timeSequence();
                savedCategory = {
                    order,
                    key: order
                };
                categories[categoryId] = savedCategory;
                needSaveOrder = true;
            }
            Object.assign(group, savedCategory);
            if (sortList) {
                Chat.sort(group.list, sortList, app);
            }
            return group;
        }).sort((g1, g2) =&gt; {
            let result = g2.order - g1.order;
            if (result === 0) {
                result = g1.id &gt; g2.id ? -1 : 1;
            }
            return -result;
        });
        if (needSaveOrder) {
            user.config.contactsCategories = categories;
        }
        return orderedGroups;
    }
    if (sortList) {
        Chat.sort(contactChats, sortList, app);
    }
    return contactChats;
};

/**
 * &#x83B7;&#x53D6;&#x8BA8;&#x8BBA;&#x7EC4;&#x804A;&#x5929;
 * @param {boolean|String|Function} sortList &#x662F;&#x5426;&#x6392;&#x5E8F;&#x6216;&#x8005;&#x6307;&#x5B9A;&#x6392;&#x5E8F;&#x89C4;&#x5219;
 * @param {boolean} [groupedBy=false] &#x662F;&#x5426;&#x6309;&#x5206;&#x7EC4;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;
 * @return {Object|Array.&lt;Chat&gt;}
 */
export const getGroupsChats = (sortList = true, groupedBy = false) =&gt; {
    const {user} = profile;
    if (!user) {
        return [];
    }
    const groupChats = queryChats(chat =&gt; chat.isGroupOrSystem, sortList);
    if (groupedBy === &apos;category&apos;) {
        const groupedChats = {};
        groupChats.forEach(chat =&gt; {
            const {isDismissed} = chat;
            const isHidden = chat.hide;
            const categoryId = isDismissed ? &apos;_dismissed&apos; : isHidden ? &apos;_hidden&apos; : (chat.category || &apos;&apos;);
            const categoryName = isDismissed ? Lang.string(&apos;chats.menu.group.dismissed&apos;) : isHidden ? Lang.string(&apos;chats.menu.group.hidden&apos;) : (categoryId || user.config.groupsDefaultCategoryName);
            if (!groupedChats[categoryId]) {
                groupedChats[categoryId] = {id: categoryId, title: categoryName || Lang.string(&apos;chats.menu.group.default&apos;), list: [chat]};
                if (isDismissed || isHidden) {
                    groupedChats[categoryId].system = true;
                }
            } else {
                groupedChats[categoryId].list.push(chat);
            }
        });
        const groupKeys = Object.keys(groupedChats);
        if (groupKeys.length === 1 &amp;&amp; !groupKeys[0]) {
            return groupChats;
        }
        const categories = user.config.groupsCategories;
        let needSaveOrder = false;
        const orderedGroups = groupKeys.map(categoryId =&gt; {
            const group = groupedChats[categoryId];
            let savedCategory = categories[categoryId];
            if (!savedCategory) {
                const order = categoryId === &apos;_dismissed&apos; ? 999999999999 : timeSequence();
                savedCategory = {
                    order,
                    key: order
                };
                categories[categoryId] = savedCategory;
                needSaveOrder = true;
            }
            Object.assign(group, savedCategory);
            if (sortList) {
                Chat.sort(group.list, sortList, app);
            }
            return group;
        }).sort((g1, g2) =&gt; {
            let result = g2.order - g1.order;
            if (result === 0) {
                result = g1.id &gt; g2.id ? 1 : -1;
            }
            return -result;
        });
        if (needSaveOrder) {
            user.config.groupsCategories = categories;
        }
        return orderedGroups;
    }
    return groupChats;
};

/**
 * &#x83B7;&#x53D6;&#x804A;&#x5929;&#x5206;&#x7EC4;&#x4FE1;&#x606F;
 * @param {string} type &#x7C7B;&#x578B;&#xFF0C;&#x5305;&#x62EC; contact&#xFF08;&#x8054;&#x7CFB;&#x4EBA;&#xFF09;&#xFF0C;group&#xFF08;&#x8BA8;&#x8BBA;&#x7EC4;&#xFF09;
 * @return {Array.&lt;Object&gt;}
 */
export const getChatCategories = (type = &apos;contact&apos;) =&gt; {
    if (type === &apos;contact&apos;) {
        return getContactsChats(false, &apos;category&apos;);
    }
    if (type === &apos;group&apos;) {
        const groups = getGroupsChats(false, &apos;category&apos;);
        if (groups.length &amp;&amp; groups[0].entityType === &apos;Chat&apos;) {
            return [];
        }
        return groups;
    }
    return [];
};

/**
 * &#x641C;&#x7D22;&#x804A;&#x5929;
 * @param {string} searchKeys &#x641C;&#x7D22;&#x5173;&#x952E;&#x5B57;&#xFF0C;&#x591A;&#x4E2A;&#x5173;&#x952E;&#x5B57;&#x4F7F;&#x7528;&#x7A7A;&#x683C;&#x5206;&#x9694;
 * @param {string} chatType &#x804A;&#x5929;&#x7C7B;&#x578B;&#xFF0C;&#x5305;&#x62EC; contacts&#xFF08;&#x8054;&#x7CFB;&#x4EBA;&#xFF09;&#xFF0C;groups&#xFF08;&#x8BA8;&#x8BBA;&#x7EC4;&#xFF09;
 * @return {Array.&lt;Chat&gt;}
 */
export const searchChats = (searchKeys, chatType) =&gt; {
    if (StringHelper.isEmpty(searchKeys)) {
        return [];
    }
    searchKeys = searchKeys.trim().toLowerCase().split(&apos; &apos;);
    if (!searchKeys.length) {
        return [];
    }

    const isContactsType = chatType === &apos;contacts&apos;;
    const isGroupsType = chatType === &apos;groups&apos;;
    const hasChatType = isContactsType || isGroupsType;

    if (!hasChatType || isContactsType) {
        getContactsChats();
    }

    const caculateScore = (sKey, findIn) =&gt; {
        if (StringHelper.isEmpty(sKey) || StringHelper.isEmpty(findIn)) {
            return 0;
        }
        if (sKey === findIn) {
            return SEARCH_SCORE_MAP.matchAll;
        }
        const idx = findIn.indexOf(sKey);
        return idx === 0 ? SEARCH_SCORE_MAP.matchPrefix : (idx &gt; 0 ? SEARCH_SCORE_MAP.include : 0);
    };

    return queryChats(chat =&gt; {
        const chatGid = chat.gid.toLowerCase();
        if (hasChatType) {
            if ((isContactsType &amp;&amp; !chat.isOne2One) || (isGroupsType &amp;&amp; !chat.isGroupOrSystem)) {
                return;
            }
        }

        // Do not show delete one2one chat in search result
        if (chat.isDeleteOne2One) {
            return;
        }

        let score = 0;
        const chatName = chat.getDisplayName(app, false).toLowerCase();
        const pinYin = chat.getPinYin(app);
        let theOtherOneAccount = &apos;&apos;;
        let theOtherOneContactInfo = &apos;&apos;;
        if (chat.isOne2One) {
            const theOtherOne = chat.getTheOtherOne(app);
            if (theOtherOne) {
                theOtherOneAccount = theOtherOne.account;
                theOtherOneContactInfo += (theOtherOne.email || &apos;&apos;) + (theOtherOne.mobile || &apos;&apos;);
            } else if (DEBUG) {
                console.warn(&apos;Cannot get the other one of chat&apos;, chat);
            }
        }
        searchKeys.forEach(s =&gt; {
            if (StringHelper.isEmpty(s)) {
                return;
            }
            if (s.length &gt; 1) {
                if (s[0] === &apos;#&apos;) { // id
                    s = s.substr(1);
                    score += 2 * caculateScore(s, chatGid);
                    if (chat.isSystem || chat.isGroup) {
                        score += 2 * caculateScore(s, chatName);
                        if (chat.isSystem) {
                            score += 2 * caculateScore(s, &apos;system&apos;);
                        }
                    }
                } else if (s[0] === &apos;@&apos;) { // account or username
                    s = s.substr(1);
                    if (chat.isOne2One) {
                        score += 2 * caculateScore(s, theOtherOneAccount);
                    }
                }
            }
            score += caculateScore(s, chatName);
            score += caculateScore(s, pinYin);
            if (theOtherOneContactInfo) {
                score += caculateScore(s, theOtherOneContactInfo);
            }
        });
        chat.score = score;
        return score &gt; 0;
    }, ((x, y) =&gt; x.score - y.score));
};

/**
 * &#x4ECE;&#x7F13;&#x5B58;&#x4E2D;&#x79FB;&#x9664;&#x6307;&#x5B9A; GID &#x7684;&#x804A;&#x5929;
 * @param {string} gid &#x8981;&#x79FB;&#x9664;&#x7684;&#x804A;&#x5929; GID
 * @return {boolean} &#x79FB;&#x9664;&#x7ED3;&#x679C;
 */
export const removeChat = gid =&gt; {
    const removedChat = chats[gid];
    if (removedChat) {
        removedChat.delete = true;
        delete chats[gid];
        Events.emitDataChange({chats: {[gid]: removedChat}});
        return true;
    }
    return false;
};

/**
 * &#x83B7;&#x53D6;&#x6307;&#x5B9A;&#x804A;&#x5929;&#x4E2D;&#x53D1;&#x9001;&#x548C;&#x63A5;&#x6536;&#x7684;&#x6587;&#x4EF6;
 * @param {string} chat &#x804A;&#x5929;&#x5B9E;&#x4F8B;
 * @param {bool} [includeFailFile=false] &#x662F;&#x5426;&#x5305;&#x542B;&#x53D1;&#x9001;&#x5931;&#x8D25;&#x7684;&#x6587;&#x4EF6;
 * @return {Promise}
 */
export const getChatFiles = (chat, includeFailFile = false) =&gt; {
    return getChatMessages(chat, (x =&gt; x.contentType === &apos;file&apos;), 0).then(fileMessages =&gt; {
        let files = null;
        if (fileMessages &amp;&amp; fileMessages.length) {
            if (includeFailFile) {
                files = fileMessages.map(fileMessage =&gt; fileMessage.fileContent);
            } else {
                files = [];
                fileMessages.forEach(fileMessage =&gt; {
                    const {fileContent} = fileMessage;
                    if (fileContent.send === true &amp;&amp; fileContent.id) {
                        files.push(fileContent);
                    }
                });
            }
        }
        return Promise.resolve(files || []);
    });
};

/**
 * &#x83B7;&#x53D6;&#x7F13;&#x5B58;&#x4E2D;&#x6240;&#x6709;&#x516C;&#x5171;&#x804A;&#x5929;
 * @return {Array.&lt;chat&gt;}
 */
export const getPublicChats = () =&gt; (publicChats || []);

/**
 * &#x66F4;&#x65B0;&#x7F13;&#x5B58;&#x4E2D;&#x7684;&#x516C;&#x5171;&#x804A;&#x5929;
 * @param {Array.&lt;Object&gt;|Object} serverPublicChats &#x8981;&#x66F4;&#x65B0;&#x7684;&#x516C;&#x5171;&#x804A;&#x5929;
 * @return {void}
 */
export const updatePublicChats = (serverPublicChats) =&gt; {
    publicChats = [];
    if (serverPublicChats) {
        if (!Array.isArray(serverPublicChats)) {
            serverPublicChats = [serverPublicChats];
        }
        if (serverPublicChats.length) {
            serverPublicChats.forEach(chat =&gt; {
                chat = Chat.create(chat);
                publicChats.push(chat);
            });
        }
    }
    Events.emitDataChange({publicChats});
};

/**
 * &#x76D1;&#x542C;&#x7F13;&#x5B58;&#x804A;&#x5929;&#x521D;&#x59CB;&#x5316;&#x4E8B;&#x4EF6;&#xFF08;&#x7B2C;&#x4E00;&#x6B21;&#x4ECE;&#x670D;&#x52A1;&#x5668;&#x83B7;&#x5F97;&#x5230;&#x804A;&#x5929;&#x5217;&#x8868;&#xFF09;
 * @param {Function(chats: Array&lt;Chat&gt;)} listener &#x4E8B;&#x4EF6;&#x56DE;&#x8C03;&#x51FD;&#x6570;
 * @return {Symbol}
 */
export const onChatsInit = listener =&gt; {
    return Events.on(EVENT.init, listener);
};

/**
 * &#x76D1;&#x542C;&#x804A;&#x5929;&#x6D88;&#x606F;&#x53D8;&#x66F4;&#x4E8B;&#x4EF6;&#xFF08;&#x4F8B;&#x5982;&#x7528;&#x6237;&#x6536;&#x5230;&#x4E86;&#x65B0;&#x6D88;&#x606F;&#xFF09;
 * @param {Function(chats: Array&lt;ChatMessage&gt;)} listener &#x4E8B;&#x4EF6;&#x56DE;&#x8C03;&#x51FD;&#x6570;
 * @return {Symbol}
 */
export const onChatMessages = listener =&gt; {
    return Events.on(EVENT.messages, listener);
};

// &#x76D1;&#x542C;&#x7528;&#x6237;&#x8D44;&#x6599;&#x53D8;&#x66F4;&#x4E8B;&#x4EF6;&#xFF0C;&#x901A;&#x5E38;&#x5728;&#x7528;&#x6237;&#x767B;&#x5F55;&#x4E4B;&#x540E;
profile.onSwapUser(user =&gt; {
    // &#x5C06;&#x4E0A;&#x4E00;&#x4E2A;&#x7528;&#x6237;&#x7684;&#x804A;&#x5929;&#x7F13;&#x5B58;&#x6570;&#x636E;&#x6E05;&#x7A7A;
    initChats();
});

// &#x76D1;&#x542C;&#x7528;&#x6237;&#x6210;&#x5458;&#x53D8;&#x66F4;&#x4E8B;&#x4EF6;
members.onMembersChange(newMembers =&gt; {
    // &#x904D;&#x5386;&#x6BCF;&#x4E00;&#x4E2A;&#x804A;&#x5929;&#xFF0C;&#x6807;&#x8BB0;&#x804A;&#x5929;&#x5DF2;&#x66F4;&#x65B0;
    forEachChat(chat =&gt; {
        chat._membersSet = null;
        chat.renewUpdateId();
    });
});

export default {
    init: initChats,
    update: updateChats,
    get: getChat,
    getAll: getAllChats,
    getRecents: getRecentChats,
    forEach: forEachChat,
    getLastActiveChat,
    query: queryChats,
    remove: removeChat,
    search: searchChats,
    getChatFiles,
    deleteLocalMessage,
    getChatMessages,
    updateChatMessages,
    saveChatMessages,
    getPublicChats,
    updatePublicChats,
    getContactsChats,
    getGroups: getGroupsChats,
    onChatsInit,
    onChatMessages,
    getOne2OneChatGid,
    countChatMessages,
    createCountMessagesTask,
    searchChatMessages,
    getChatCategories,
    getLastRecentChat,
    loadChatMessages,
};
</code></pre>

</div>

<footer class="footer">
  Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(1.1.0)</span><img src="./image/esdoc-logo-mini-black.png"></a>
</footer>

<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
